home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 15 / macformat_15.iso / C de cerca / Codewarrior Lite / MacOS Support / Headers / ANSI Headers / unix.h < prev    next >
Text File  |  1995-12-29  |  1KB  |  86 lines

  1. /*
  2.  *    File:        unix.h
  3.  *                ©1993-1995 metrowerks Inc. All rights reserved
  4.  *    Author:        Berardino E. Baratta
  5.  *
  6.  *    Content:    Interface file to standard UNIX-style entry points ...
  7.  *
  8.  *    NB:            This file implements some UNIX low level support.  These functions
  9.  *                are not guaranteed to be 100% conformant.
  10.  */
  11.  
  12. #ifndef    _UNIX
  13. #define    _UNIX
  14.  
  15. #ifndef _STDIO
  16. #include <stdio.h>
  17. #endif
  18.  
  19. #ifndef _FCNTL
  20. #include <fcntl.h>
  21. #endif
  22.  
  23. #ifndef _STAT
  24. #include <stat.h>
  25. #endif
  26.  
  27. #ifndef    _UNISTD
  28. #include <unistd.h>
  29. #endif
  30.  
  31. #ifndef _UTIME
  32. #include <utime.h>
  33. #endif
  34.  
  35. #ifndef _UTSNAME
  36. #include <utsname.h>
  37. #endif
  38.  
  39. #pragma options align=mac68k
  40.  
  41. #if __CFM68K__ && __USING_IMPORTED_ANSI__
  42. #pragma import on
  43. #endif
  44.  
  45. /*
  46.  *    Globals for setting the type and creator of new files ...
  47.  */
  48. extern long _fcreator, _ftype;
  49.  
  50. #ifdef __cplusplus
  51. extern "C" {
  52. #endif
  53.  
  54. /*
  55.  *    Returns the fileid associated with a stream.
  56.  */
  57. int fileno(FILE *stream);
  58.  
  59. /*
  60.  *    Converts a fileid into a stream.
  61.  */
  62. FILE *fdopen(int fildes, char *type);
  63.  
  64. /*
  65.  *    Return the current on disk file position.
  66.  */
  67. long tell(int fildes);
  68.  
  69. /*
  70.  *    Internal ANSI library functions for reading and writing.
  71.  */
  72. int _Fread(FILE *stream, unsigned char *buf, int count);
  73. int _Fwrite(FILE *stream, const unsigned char *buf, int count);
  74.  
  75. #ifdef __cplusplus
  76. }
  77. #endif
  78.  
  79. #if __CFM68K__ && __USING_IMPORTED_ANSI__
  80. #pragma import reset
  81. #endif
  82.  
  83. #pragma options align=reset
  84.  
  85. #endif
  86.